package edu.idp.tools;


import edu.idp.client.InterDrawPanel;

import javax.swing.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

/**
 * Simple tool that allows you to view the images in the database and to view
 * the changes over time.
 */
public class ObjectViewer extends JFrame {

    public ObjectViewer(String title) {
        super(title);
        this.addWindowListener(new WindowAdapter() {
            public void windowClosing(WindowEvent event) {
                try {
                    dispose();
                }
                catch (Exception e) {
                }
                //System.exit(0);
            }
        });
    }

    public static void main(String[] argv) {

        InterDrawPanel idpp = new InterDrawPanel(null);
        idpp.setBackground(java.awt.Color.white);
        ObjectViewer ov = new ObjectViewer("Object Viewer Window");
        idpp.clearTools();
        idpp.drawNone();
        ov.getContentPane().add(idpp);
        ov.setSize(550, 550);

//    InterDrawPane idpp = new InterDrawPanel(null);
        ImageDisplay id = new ImageDisplay(idpp, ov);
        ov.setVisible(true);
        id.setVisible(true);

    }


}


